<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:replace="~{/fragment/header :: header}"></div>
    <div th:replace="~{/fragment/header :: header-css}"></div>
    <div th:replace="~{/fragment/header :: header-nav}"></div>
</head>
<body>
<div class="container">
    <a th:href="@{/vehicle/insert}" class="btn btn-primary">新增</a>
    <table class="table table-striped">
        <thead>
            <tr>
                <th scope="row">序号</th>
                <th>车牌号</th>
                <th>存储URL</th>
                <th>出入场标识</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
        <tr th:each="vehicle : ${list}">
            <td th:text="${vehicle.id}"></td>
            <td th:text="${vehicle.licencePlate}"></td>
            <td th:text="${vehicle.piUrl}"></td>
            <td th:text="${vehicle.isActive}"></td>
            <td>
                <a  th:href="@{/vehicle/edit/{id}(id=${vehicle.id})}" class="btn btn-primary">修改</a>
                <a  th:href="@{/vehicle/detail/{id}(id=${vehicle.id})}" class="btn btn-secondary">详细信息</a>
                <a  th:href="@{/vehicle/delete/{id}(id=${vehicle.id})}" class="btn btn-danger">删除</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>


<div th:replace="~{/fragment/header :: header-js}"></div>
<div th:replace="~{/fragment/footer :: footer}"></div>
</body>
</html>